import {
    createRouter,
    createWebHistory
} from 'vue-router'

const routerHistory = createWebHistory()

export const Layout = () => import("@/layout/index.vue");

const router = createRouter({
    history: routerHistory,
    routes: [{
        path: '/',
        redirect: '/index'
    },
        {
            path: "/index",
            name: "index",
            component: () => import("../views/Index.vue"),
            meta: {title: 'OA工作流'}
        },
        {
            path: "/formsPanel",
            name: "formsPanel",
            component: () => import("../views/admin/FormsPanel.vue"),
            meta: {title: '表单列表'}
        },
        {
            path: "/admin/design",
            name: "design",
            component: () => import("../views/admin/FormProcessDesign.vue"),
            meta: {title: '表单流程设计',}
        },{
            path: "/haha",
            name: "design",
            component: Layout,
            meta: {title: '表单流程设计',}
        }]
})
export default router